package net.qhzw.geologr5.gis.service.system.controller;


import net.qhzw.geologr5.gis.common.framework.common.BaseQuery;
import net.qhzw.geologr5.gis.common.framework.utils.JsonResult;
import net.qhzw.geologr5.gis.service.system.query.GisQuery;
import net.qhzw.geologr5.gis.service.system.query.LayerQuery;
import net.qhzw.geologr5.gis.service.system.service.GisService;
import net.qhzw.geologr5.gis.service.system.vo.gis.ApplyResource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("gis")
public class GisController {

    @Autowired
    private GisService gisService;


    /***
     * gis首页查询
     * @param query
     * @return
     */
    @GetMapping("index")
    public JsonResult index(GisQuery query) {
        return gisService.index(query);
    }

    /***
     * 图层查询
     */
    @GetMapping("getLayer")
    public JsonResult getLayer(LayerQuery query) {
        return gisService.getLayer(query);
    }


    /***
     * 申请资源
     * @return
     */
    @PostMapping("reqResources")
    public JsonResult reqResources(@RequestBody ApplyResource applyRes) {
        return gisService.reqResources(applyRes);
    }


}
